<?
session_start();
?>

<div id="header">
		<h1 id="logo"><a href="index.htm">Lyn's Coupon</a></h1>	
		
		
	<!--	<div id="cart">
			<a href="#" class="cart-link">Your Shopping Cart</a>
			<div class="cl">&nbsp;</div>
			<span>Articles: <strong>4</strong></span>
			&nbsp;&nbsp;
			<span>Cost: <strong>$250.99</strong></span>
		</div>-->
<script language="javascript">

function validateLogin()
{

if (document.frmLogin.username.value=="")
	{
		alert("Please enter username");
		document.frmLogin.username.focus();
		return false;
	}
	
	
	if (document.frmLogin.password.value=="")
	{
		alert("Password can't be empty");
		document.frmLogin.password.focus();
		return false;
	}
	
return true;
}





</script>	
		
		<div id="navigation">
			<ul>
			   <li><a href="index.htm" <? if($_REQUEST['page'] == 'index.htm') { ?> class="active" <? } ?>>Home</a></li>
			    <li><a href="ft-stuff.htm" <? if($_REQUEST['page'] == 'ft-stuff.htm') { ?> class="active" <? } ?>>Featured Stuff</a></li>
			    <li><a href="news.htm" <? if($_REQUEST['page'] == 'news.htm') { ?> class="active" <? } ?>>News</a></li>
			    <li><a href="contact.htm" <? if($_REQUEST['page'] == 'contact.htm') { ?> class="active" <? } ?>>Contact</a></li>
				<? 
				if($_SESSION['logged'] != "1") {
				?>				
				<li><a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='block';document.getElementById('fade').style.display='block'">Login</a></li>
				
				<li><a href="register.htm" <? if($_REQUEST['page'] == 'register.htm') { ?> class="active" <? } ?>>Register</a></li>
				
				<? } else { ?>
				<li><a href = "includes/logout.php">Logout</a></li>
				<? } ?>
				
				
					
			</ul>
		</div>
		
	</div>
	
	<div id="light" class="white_content"> 
<table> 
<form name="frmLogin" id="frmLogin" action="includes/chk_user_login.php" method="post" onsubmit="return validateLogin();"> 

<tr><td colspan="4" valign="top" align="right"><a href = "javascript:void(0)" onclick = "document.getElementById('light').style.display='none';document.getElementById('fade').style.display='none'" style="text-decoration:none">Close [x]</a></td></tr>
<tr><td width="61" height="31">Username</td>
<td width="14"> :</td>
<td width="253"><input name="username" type="text" id="username" size="30" maxlength="25" /></td>
<td width="253" align="right" valign="top"></td></tr> 
<tr><td>Password</td><td>:</td>
  <td><input name="password" type="password" id="password" size="30" maxlength="25" /></td>
  <td>&nbsp;</td> </tr>
<tr><td colspan="2"></td>
  <td style="padding-top:4px;"><input name="submit" type="submit" style="height: 25px; width: 80px" value="Login" /></td>
  <td><br /></td></tr> 
</form> 
</table> </div> 
<div id="fade" class="black_overlay"></div> 

<table width="100%">
<tr>
<td align="right" height="15px;"><? if($_SESSION['error']!="")
	{
	?>
	<font color="#8B0000">
	<?		
	echo $_SESSION['error'];
	?> </font> <? }
	
	 ?></td>
</tr>
</table>
